﻿<%@ Control Language="c#" Inherits="Web.Control.WWW.Files.Commentlist" %>
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<div class="Center9001">
					<div class="Center9001Right">
						<div class="Title">
							<h1><%=GetText("WK154", new string[] { HttpUtility.HtmlEncode(DocModel.Title) })%></h1>
							<div class="copyright"><a href="/"><%=GetText("M0001")%></a> > <a href="/files/default.htm"><%=GetText("M0009")%></a> > <a href="/files/doc/<%=docid%>.htm"><%=HttpUtility.HtmlEncode(DocModel.Title)%></a></div>
						</div>
						<div class="Center9001Content">
							<div class="Content628">
								<!--content area-->
								<div class="margin20">
									<div id="MessagesBox" class="DisplayNone" style="display: none">
										<div class="MessagePanel4">
											<img id="MessageImg" src="/images/ico_info.gif" style="border-width: 0px;">
											<div id="MessageText">
											</div>
										</div>
									</div>
									<!--wall loop started-->
									<div id="divComment">
									<asp:Repeater ID="repComm" runat="server">
									<ItemTemplate>	
									<div class="files_comment">
										<div class="files_comment_avatar Pic50" align="center"><a class="photo_50" href="<%#LoginHost%>/<%#Eval("MemberNo") %>.htm" title="<%#HttpUtility.HtmlAttributeEncode(Eval("Nickname").ToString()) %>"><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" />" : Eval("Avatar", "<img src=\"{0}\" />").ToString()%></a></div>
										<div class="files_comment_Bacontent">
											<div class="files_comment_acontent"><a href='<%#LoginHost%>/<%#Eval("MemberNo") %>.htm'><%#HttpUtility.HtmlEncode(Eval("Nickname").ToString()) %></a> <span class="grey10"><%#FormatDiffDate(GetText("C0036"), Eval("DiffLastUpdate").ToString())%></span><div class="margin5"><%#Lx.Web.Common.UI.Globals.HtmlStrippedText(Eval("Desc").ToString()).Replace("\n", "<br/>")%></div></div>
											<div class="Clear"></div>
										</div>
										<div class="Clear"></div>
									</div>
									</ItemTemplate>
									</asp:Repeater>
									</div>
									<!--wall loop end-->
									<div id="divCommentPage" class="margin5">
										<%=CreatePageNav(RecordCount, 15, pageIndex,
									 "", string.Format("<span class='page_none grey10'><a href='{1}/files/Comment-$I$-{2}.hrm/'>{0}</a></span>&nbsp;", HttpUtility.UrlEncode(GetText("Prev")), LoginHost, HttpUtility.UrlEncode(Request["did"])),
									 "", string.Format("<span class='page_none grey10'><a href='{1}/files/Comment-$I$-{2}.htm'>{0}</a></span>&nbsp;", HttpUtility.UrlEncode(GetText("Next")), LoginHost, HttpUtility.UrlEncode(Request["did"])),
									string.Format("<span class='page_select'>{0}</span>&nbsp;",pageIndex),
									 string.Format("<span class='page_none grey10'><a href='{0}/files/Comment-$I$-{1}.htm'>$I$</a></span>&nbsp;", LoginHost, HttpUtility.UrlEncode(Request["did"])))%>   
									</div>
									<div>
										<span class="black16b"><%=GetText("SF019", new string[] { HttpUtility.HtmlEncode(DocModel.Title) })%></span>
										<p><textarea id="txtComment" rows="5" class="common100D"></textarea>
										<span name="__V_S" elt1="txtComment" reg="[\s\S]{3,2000}" style="color: Red;display:none" class="validMsg red10"><%=GetText("ST155",new string[]{"3","2000"})%></span>
										</p>
										<p><input id="btnSave" value="<%=GetText("C0045")%>" type="button" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"javascript:if($ValidButton$())Save();\"":"onclick=\"NotAffirm()\""%> class="button" /></p>
									</div>
								</div>

								<!--content end-->
								<!--add comment-->
								<!--add comment end-->
							</div>
						</div>
					</div>
					<div class="Center9001Left">
						<div class="right_layerA margin20T">
							<input id="txtSear" name="txtSear_name" type="text" class="common160" onkeydown="$Enter$(event,'bttSear')"/><a href="#" id="bttSear" name="bttSear_name" class="buttonimg"  onclick="javascript:location.href='/files/search-'+document.getElementById('txtSear').value.replace(/\?/gi, '').replace(/\//gi, '').replace(/-/gi, '').replace(/&/gi, '')+'.htm';"  title="<%=GetText("C0066")%>" ><img src="/Images/btn_search.gif" border="0" class="img" /></a><br /><a href="<%=LoginHost%>/files/AdvancedSearch.htm" ><%=GetText("C0067")%></a></div>
						<div class="right_layerA">
						<%if(rfileList.Count>0){ %>
							<div class="layer_contentA">
								<h4><%=GetText("SF020")%></h4>
								<div>
									<% for (int i = 0; i < TagList.Count; i++)
            { %>
									<a href="/files/tag/<%= TagList[i] %>-1.htm"><%= HttpUtility.HtmlEncode(TagList[i])%></a>&nbsp;&nbsp;
									<% } %>
								</div>
								<div class="margin10 fi_related_window">
									<ul class="right_file_list">
										<asp:Repeater ID="repLfil" runat="server">
										<ItemTemplate>
										<li><img src="/images/<%#Eval("FileFormat").ToString().Trim().Replace('/','_') %>_16.gif" align="absmiddle" /> <a href="/files/doc/<%#Eval("DocID") %>.htm"><%#HttpUtility.HtmlEncode(Eval("Title").ToString())%></a> <span class="grey12" dir="ltr">(<%#Eval("Views")%>)</span></li>
										</ItemTemplate>
										</asp:Repeater>
									</ul>
								</div>
							</div>
						</div>
						<%} %>
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=GetText("SF022")%></h4>
								<div class="layer_contentA5">
								<div class="margin5"><img alt="" src="/images/icon_common_down.gif" /> <strong><a href="#" onclick="Download()" title="<%=GetText("SF201")%>"><%=GetText("SF201")%></a></strong>&nbsp;&nbsp;<%= DocModel.DownLoads %> <%=GetText("SF038")%></div>
								<div class="margin5">
									<div id="ThaiRating" onmouseout="RateOut()">
									<%for (int i = 0; i < Math.Round(DocModel.Rates, 0); i++)
									{%>
									<span id="ThaiRating_Star_<%=(i+1)%>" onmouseover="RateOver(<%=(i+1)%>)" onclick="RateClick(<%=(i+1)%>)" class="ratingStar filledRatingStar" style="float: left;">&nbsp;</span>
									<%} %>
									<%for (int i = (int)Math.Round(DocModel.Rates, 0); i < 5; i++)
									{ %>
									<span id="ThaiRating_Star_<%=(i+1)%>" onmouseover="RateOver(<%=(i+1)%>)" onclick="RateClick(<%=(i+1)%>)" class="ratingStar emptyRatingStar" style="float: left;">&nbsp;</span>
									<%} %>
									</div>
									<div class="floatl">&nbsp;&nbsp;<strong><span id="RFen"><%=DocModel.Rates.ToString("N1")%></span> <%=GetText("WK098")%></strong> <span dir="ltr">(</span><span id="RRen" dir="ltr"><%=DocModel.Votes%></span> <%=GetText("WK096")%><span dir="ltr">)</span></div>
									<div class="clear"></div>
								</div>
								<div class="margin5">
										<a href="javascript:void(0);" onclick="AddDelLike()"><img id="imgLike" alt="" src="/images/<%=(IsLike?"icon_good2":"icon_good")%>.gif" border="0" align="absmiddle" /></a> <a href="javascript:void(0);" onclick="AddDelLike()"><%=GetText("SF202")%></a> <span id="LikeID"><%=DocModel.Likes %></span> <%=GetText("SF037")%></div>
								<div class="margin5"><img src="/Images/icon_common_share.gif" align="absmiddle" /> <a href="#" title="<%=GetText("SR016")%>" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"$ShareRes$()\"":"onclick=\"NotAffirm()\""%>><%=GetText("C3008")%></a></div>
								<div class="margin5"><img src="/Images/icon_common_comment.gif" align="absmiddle" /> <a href="/files/comment-1-<%=DocModel.DocID%>.htm"><%=GetText("C0111")%> <span id="commentCount" dir="ltr">(<%=DocModel.CommentCount%>)</span></a></div>
								<div class="margin5"><img src="/Images/icon_common_flag.gif" align="absmiddle" /> <a href="#" title="<%=GetText("C0110")%>" onClick="$Feedback$()"><%=GetText("C0110")%></a></div>
								<div class="margin5">
										<script type="text/javascript">
										addthis_url	= window.location.href;  
										addthis_title  = "<%=HttpUtility.HtmlEncode(DocModel.Title)%>"; 
										addthis_pub	= "italki.com";
										//document.getElementById("shareUrl").value = addthis_url;
										</script>
										<script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
								</div></div>
							</div>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=GetText("SF043")%></h4>
								<div class="layer_contentA5">
									<div class="floatl pic50 wid65"><A class="photo_50" href="/<%=DocModel.MemberNo%>.htm"><img alt="" src="<%= DocModel.Avatar %>" /></A></div>
									<div class="floatr wid120"><span class="blue14bu"><a href="/<%=DocModel.MemberNo%>.htm"><%=HttpUtility.HtmlEncode(DocModel.Nickname)%></a></span><br /><%=GetText(DocModel.CreateDate.ToString("HH:mm, dd/MM/yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo))%></div>
									<div class="clear"></div>
								</div>
							</div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<div id="commedItem" style="display:none"> 
	<div class="files_comment">
		<div class="files_comment_avatar Pic50" align="center"><a class="photo_50" href="<%=LoginHost%>/$MemberNo$.htm" title="$Nickname$">$Avatar$</a></div>
		<div class="files_comment_Bacontent">
			<div class="files_comment_acontent"><a href='<%=LoginHost%>/$MemberNo$.htm'>$Nickname$</a> <span class="grey10">$CreateDate$</span><div class="margin5">$Desc$</div></div>
			<div class="Clear"></div>
		</div>
		<div class="Clear"></div>
	</div>
</div>
<script>
var gIsLike = <%=(IsLike?"false":"true")%>;
var lhost="<%=LoginHost %>";
var m = '<%=HttpContext.Current.User.Identity.Name%>';
var gDateFormat = "<%=GetText("C0033")%>";
var gStrDate = "<%=GetText("C0036")%>";
var gPageIndex = <%=pageIndex%>;
var gLastCount = <%=RecordCount %>;
var gRequest = false;
var sRequest = "<%=GetText("WK051")%>";
var sRateValue = <%=(int)Math.Round(DocModel.Rates, 0) %>;
var RateValue = sRateValue;
var tmp = sRateValue;
var MessageTextS="<%=GetText("C1002")%>";
var MessageTextF="<%=GetText("C1011")%>";
var MessageImageS = "/images/ico_info.gif";
var MessageImageF = "/images/ico_info.gif";

var gPageName = '<%=Escape(Request["did"])%>';
var strHome = "";
var strPre = "<span class='page_none grey10'><a href='/files/Comment-$I$-<%=HttpUtility.UrlEncode(Request["did"])%>.htm'><%=HttpUtility.UrlEncode(GetText("Prev"))%></a></span>&nbsp;";
var strLast = "";
var strNext = "<span class='page_none grey10'><a href='/files/Comment-$I$-<%=HttpUtility.UrlEncode(Request["did"])%>.htm'><%=HttpUtility.UrlEncode(GetText("Next"))%></a></span>&nbsp;";
var strSel = "<span class='page_select'>$I$</span>&nbsp;";
var strUnSel = "<span class='page_none grey10'><a href='/files/Comment-$I$-<%=HttpUtility.UrlEncode(Request["did"])%>.htm'>$I$</a></span>&nbsp;";
</script>
